package org.snail.attendence.mapper;

import org.snail.attendence.bean.AttCheckCondition;
import org.snail.attendence.bean.AttendanceCheckDO;
import org.snail.attendence.bean.AttendenceCountDO;
import org.springframework.stereotype.Repository;

import java.util.List;

@Repository
public interface AttendanceCheckMapper {

    /**
     * 根据人员id,查找该用户的考勤记录
     */
    public List<AttendenceCountDO> findAttendanceListByCondition(AttCheckCondition attCheckCondition);

    /**
     * 核算考勤，即在新增考勤历史纪录
     */
    public void saveAttendanceHistory(AttendanceCheckDO attendanceCheckDO);

    /**
     * 查找最后一条考勤记录的结束时间
     */
    public AttendanceCheckDO lastCheck(AttCheckCondition attCheckCondition);

    /**
     * 查找员工历史记录
     * @param attCheckCondition
     * @return
     */
    List<AttendanceCheckDO> findAttHistoryList(AttCheckCondition attCheckCondition);

    public void delAttHistory(Integer id);
}
